{% load cms_admin i18n adminmedia %}
<div class="cont{% if CMS_MODERATOR %} moderatorstate{{ page_moderator_state.state }}{% endif %}">
	<div class="col1">
		{% if has_change_permission %}
			<a href="{{ url }}{{ page.id }}/" class="title" {% if cl.is_popup %}onclick="opener.dismissRelatedLookupPopup(window, {{ page.id }}); return false;" title="{% trans "select this page" %}"{% else %}title="{% trans "edit this page" %}"{% endif %}>{{ page.get_menu_title }}</a>	
			<a href="{{ url }}{{ page.id }}/" class="changelink" title="{% trans "edit this page" %}">{% trans "edit" %}</a>
		{% else %}
			<span class="title">{{ page.get_slug }}</span>
		{% endif %}
	</div>
	<div class="col2">	
		<span id="move-target-{{ page.id }}" class="move-target-container" >
			{% if not CMS_PERMISSION or has_add_permission or has_add_page_permission %}
				{# if permissions not enabled, user user haves global can_add page #}
					{% if has_add_on_same_level_permission %}
						<a href="#" class="move-target left" title="{% trans "insert above" %}"><img alt="" src="{% admin_media_prefix %}img/admin/arrow-up.gif"/></a><span class="line first"> |</span>
						<a href="#" class="move-target right" title="{% trans "insert below" %}"><img alt="" src="{% admin_media_prefix %}img/admin/arrow-down.gif"/></a><span class="line second"> |</span>
					{% endif %}
				<a href="#" class="move-target last-child" title="{% trans "insert inside" %}">↘</a>
			{% endif %}
		</span>
		
		{% if page.soft_root or page.is_home %}<div class="col-softroot"><span class="icon softroot-icon" title="{% if page.soft_root %}{% trans 'softroot' %}{% else %}{% trans 'home' %}{% endif %}"></span></div>{% endif %}
		
		<div class="col-language">{% for lang in page.get_languages|in_filtered:site_languages %}
			{% if has_change_permission %}<a href="{{ url }}{{ page.id }}/?language={{ lang }}" title="{% blocktrans with lang|upper as language %}Edit this page in {{ language }} {% endblocktrans %}">{{ lang }}</a>
			{% else %}{{ lang|upper }}
			{% endif %}
			{% if not forloop.last %} | {% endif %}
		{% endfor %}</div>
		
		<div class="col-actions">{% if not filtered %}
			{% if has_move_page_permission %}<a href="#" class="move" title="{% trans "Cut" %}" id="move-link-{{ page.id }}"><span>{% trans "cut" %}</span></a>{% endif %}{% endif %}
			{% if has_change_permission %}<a href="#" class="copy" title="{% trans "Copy" %}" id="copy-link-{{ page.id }}"><span>{% trans "copy" %}</span></a>{% endif %}
			
			{% if has_add_page_permission and has_add_on_same_level_permission %}
				<a href="#" class="addlink" title="{% trans "Add Child" %}" id="add-link-{{ page.id }}"><span>{% trans "add" %}</span></a>
			{% else %}
				{% if has_add_page_permission %}
					{# if he can add page under current page, go directly to thi url #}
					<a href="./add/?target={{ page.id }}&amp;position=last-child" class="addlink" title="{% trans "Add Child" %}" id="add-link-{{ page.id }}"><span>{% trans "add" %}</span></a>
				{% endif %}
			{% endif %}
			{% if has_delete_permission %}<a href="{{ page.id }}/delete/" title="{% trans "Delete" %}" class="deletelink"><span>{% trans "delete" %}</span></a>{% endif %}
		</div>	
		
		<div class="col-navigation">
			{% if page.in_navigation %}<label>
				<img alt="True" src="{% admin_media_prefix %}img/admin/icon-yes.gif"/>	
				{% if has_change_permission %}<input type="checkbox" class="navigation-checkbox" name="navigation-{{ page.id }}" checked="checked" value="1" />{% endif %}
			</label>
			{% else %}<label>
				<img alt="False" src="{% admin_media_prefix %}img/admin/icon-no.gif" />
				{% if has_change_permission %}<input type="checkbox" class="navigation-checkbox" name="navigation-{{ page.id }}" value="0" />{% endif %}
			</label>{% endif %}				
		</div>
		
		{% if CMS_MODERATOR %}<div class="col-moderator">
			{% if has_moderate_permission %}{% for value, title, active, css_class in page|moderator_choices:user %}<input type="checkbox" class="moderator-checkbox hidden copy-{{ css_class }}"{% if active %} checked="checked"{% endif %} value="{{ value }}" title="{{ title }}"/>
			{% endfor %}{% endif %}		
		</div>{% endif %}
		
		
		{% if CMS_MODERATOR %}<div class="col-draft">
			{% if moderator_should_approve %}<a href="./{{ page.id }}/approve/" class="icon approve" title="{% trans 'Approve directly' %}"></a>{% endif %}
			<span class="state">{{ page_moderator_state.label }}</span>
			<a href="./{{ page.id }}/preview/" class="icon selector-add viewpage" id="view-page-{{page.id}}"><span>{% trans "view" %}</span></a>
		</div>{% endif %}
		
		<div class="col-published">
			{% if has_publish_permission %}
				{% if page.published %}<input type="checkbox" class="publish-checkbox" name="status-{{ page.id }}" checked="checked" value="1" title="{% trans 'Unpublish' %}"/>
				{% else %}<input type="checkbox" class="publish-checkbox" name="status-{{ page.id }}" value="0" title="{% trans 'Publish' %}"/>
				{% endif %}
			{% endif %}

			{% if CMS_MODERATOR %}
				<label>{{ page.is_public_published|boolean_icon }}</label>
				{% if page.is_public_published %}<a href="./{{ page.id }}/preview/?public=1" title="{% trans "View on page" %}" class="icon selector-add viewpage" id="view-page-{{page.id}}"><span>{% trans "view" %}</span></a>{% endif %}
			{% else %}
				<a href="./{{ page.id }}/preview/" class="icon selector-add viewpage" id="view-page-{{page.id}}"><span>{% trans "view" %}</span></a>
			{% endif %}
		</div>
		
		<div class="col-published">{{ page.publication_date|date:"Y-m-d" }}</div>
		<div class="col-published">{{ page.publication_end_date|date:"Y-m-d" }}</div>
		
		
		{% if CMS_MODERATOR %}<div class="col-lastchange">
			{% for state in page.last_page_states %}<span class="icon state-icon {{ state.css_class }}" title="{{ state.get_action_display }}"></span>
			{% endfor %}
			
		
		</div>{% endif %}
		
		<div class="col-creator">{{ page.changed_by }}</div>
	</div>
</div>
